import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/Login',
      name: 'Login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/Login/Login.vue'),
    },
    {
      path: '/AddRoomNumber',
      name: 'AddRoomNumber',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomNumber/AddRoomNumber.vue'),
    },
    {
      path: '/ShowNumber',
      name: 'ShowNumber',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomNumber/ShowNumber.vue'),
    },
    {
      path: '/UpdaNumber/:id',
      name: 'UpdaNumber',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomNumber/UpdaNumber.vue'),
    },
    {
      path: '/AddRoomInfo',
      name: 'AddRoomInfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomInfo/AddRoomInfo.vue'),
    },
    {
      path: '/ShowRoomInfo',
      name: 'ShowRoomInfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomInfo/ShowRoomInfo.vue'),
    },    {
      path: '/AddNumberinfo',
      name: 'AddNumberinfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomInfoNumber/AddNumberinfo.vue'),
    },
    {
      path: '/ShowNumberInfo',
      name: 'ShowNumberInfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomInfoNumber/ShowNumberInfo.vue'),
    },
    {
      path: '/UpdaNuminfo/:id',
      name: 'UpdaNuminfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../components/RoomInfoNumber/UpdaNuminfo.vue'),
    },
  ],
})

export default router
